import {
	request
} from "../utils/request"


export default {
	// 广场动态列表
	dynamicSquareList: (data) => {
		return request({
			url: `/amianfrontend/dynamic/square/list`,
			data: data,

		})
	},

	// 查询用户自己的动态列表
	dynamicList: (data) => {
		return request({
			url: `/amianfrontend/dynamic/list`,
			data: data,

		})
	},

	// 动态评论列表
	dynamicCommentId: (dynamicId) => {
		return request({
			url: `/amianfrontend/dynamic/comment/${dynamicId}`,
		})
	},

	// 添加动态评论
	dynamicComment: (data) => {
		return request({
			url: `/amianfrontend/dynamic/comment`,
			data: data,
			method: 'POST',
		})
	},

	// 用户点亮/取消动态爱心
	dynamicClike: (dynamicId) => {
		return request({
			url: `/amianfrontend/dynamic/like/${dynamicId}`,
		})
	},

	// 动态详情
	dynamic: (dynamicId) => {
		return request({
			url: `/amianfrontend/dynamic/${dynamicId}`,
		})
	},

	// 删除动态
	dynamicDelete: (dynamicId) => {
		return request({
			url: `/amianfrontend/dynamic/delete/${dynamicId}`,
		})
	},

	// 获取用户动态列表
	dynamicListId: (userId, data) => {
		return request({
			url: `/amianfrontend/dynamic/list/${userId}`,
			data: data
		})
	},

	// 添加动态
	dynamicPost: (data) => {
		return request({
			url: `/amianfrontend/dynamic`,
			data: data,
			method: 'POST',
		})
	},
}
